package com.htl.exampro.exam.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.htl.exampro.base.model.PageResult;
import com.htl.exampro.exam.pojo.domain.ExamResultDO;
import com.htl.exampro.exam.pojo.query.ExamResultPageParam;
import com.htl.exampro.exam.pojo.vo.ExamResultVO;
import com.htl.exampro.question.pojo.vo.AnswerDetailVO;

import java.util.List;
import java.util.Map;

/**
 * 考试结果服务接口
 */
public interface ExamResultService extends IService<ExamResultDO> {

    ExamResultVO getExamResultDetail(String id);

    PageResult<ExamResultVO> getExamHistory(ExamResultPageParam pageParam);

    int createExamResult(String examId);

    int beginExamResult(String examId);

    int updateExamResult(String examId);

    /**
     * 分页获取成绩列表
     */
    PageResult<ExamResultVO> getExamScoresPage(ExamResultPageParam pageParam);

    /**
     * 获取某学生答题详情
     */
    List<AnswerDetailVO> getAnswerPage(Long examId, Long resultId);

    /**
     * 获取考试统计信息和成绩分布
     */
    Map<String, Object> getExamResults(Long examId);
}